<?php

namespace Modules\Shop\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ArticleRequest extends FormRequest
{
    //验证规则
    public function rules()
    {
        return [
            'title' => 'required|between:5,100',
            'author' => 'required|between:1,20',
            'bewrite' => 'required|between:1,200',
            'content' => 'required',
            'thumb' => 'required',
        ];
    }

    //错误信息处理
    public function messages()
    {
        return array (
);
    }

    //权限验证
    public function authorize()
    {
        return true;
    }
}
